﻿using System.Linq;
using System.Text;
using System.Web.Mvc;
using UserRoles.Models;

namespace UserRoles.Attributes
{
    public class UserRolesAuthorizeAttribute : AuthorizeAttribute
    {
        private UserRole[] _userRoles;
        public UserRole[] UserRoles
        {
            set
            {
                _userRoles = value; 
                Roles = string.Join(",", value);
            }
            get { return _userRoles; }
        }
    }
}